const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = app => {
    app.use(
        createProxyMiddleware('/api', {  //`api`是需要转发的请求 
            target: 'http://47.102.145.189:8009',  // 这里是接口服务器地址
            changeOrigin: true,
            pathRewrite: {
                '^/api': ''
            }
        })
    )
}